<%@ page import="cn.kgc.javaweb.entity.Student" %>
<%@ page import="java.util.ArrayList" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>学生信息展示列表</title>
</head>
<body>
   <h1>学生信息列表</h1>
    <table  border="1px" cellspacing="0">
        <tr>
            <th>学号</th>
            <th>姓名</th>
            <th>年龄</th>
            <th>分数</th>
            <th>性别</th>
        </tr>
        <%
            // jsp九大内置对象之一
            //ArrayList<Student> students =(ArrayList<Student>) request.getAttribute("students");
            ArrayList<Student> students =(ArrayList<Student>) session.getAttribute("students");

            for (Student student:students){
        %>
        <tr>
            <td><%=student.getId()%></td>
            <td><%=student.getStuName()%></td>
            <td><%=student.getAge()%></td>
            <td><%=student.getScore()%></td>
            <td><%=student.getSex()%></td>
        </tr>

        <%
            }
        %>


    </table>
</body>
</html>
